//
//  EVEmptyView.h
//  EVClub
//
//  Created by LiJieming on 15/6/2.
//  Copyright (c) 2015年 BitRice. All rights reserved.
//

#import "EVBaseView.h"

extern NSString *const EVEmptyViewDefault;
extern NSString *const EVEmptyViewCustom;
extern NSString *const EVEmptyViewError;
extern NSString *const EVEmptyViewNetwork;
extern NSString *const EVEmptyViewOrder;
extern NSString *const EVEmptyViewCoupon;

@interface EVEmptyView : EVBaseView

@property (nonatomic, copy) NSString *emptyViewType;
@property (nonatomic, strong) UIImage *iconImage;
@property (nonatomic, copy) NSString *mainTitle;
@property (nonatomic, copy) NSString *secondTitle;
@property (nonatomic, copy) NSString *actionButtonTitle;

@property (nonatomic, copy) void(^actionBlock)(void);

+ (instancetype)emptyViewWithType:(NSString *)emptyViewType actionBlock:(void(^)(void))actionBlock;
+ (instancetype)emptyViewWithIconImage:(UIImage *)iconImage mainTitle:(NSString *)mainTitle secondTitle:(NSString *)secondTitle actionButtonTitle:(NSString *)actionButtonTitle actionBlock:(void(^)(void))actionBlock;

@end

@interface UIViewController (EVEmptyView)

@property (nonatomic, readonly) EVEmptyView *ev_emptyView;
@property (nonatomic, assign, setter=ev_setDisableEmptyView:) BOOL ev_disableEmptyView;
@property (nonatomic, assign, setter=ev_setEmptyViewShown:) BOOL ev_emptyViewShown;
- (EVEmptyView *)ev_showEmptyView;
- (EVEmptyView *)ev_showEmptyViewForType:(NSString *)type;
- (EVEmptyView *)ev_showEmptyViewForType:(NSString *)type title:(NSString *)title;
- (EVEmptyView *)ev_showEmptyViewForError:(NSError *)error;
- (void)hideEmptyView;
- (void)onEmptyViewResponded;

@end
